<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
    String contextPath = (String) request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="<%=contextPath%>/js/jquery-easyui-1.3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="<%=contextPath%>/css/rs.css">
	<link rel="stylesheet" type="text/css" href="<%=contextPath%>/js/jquery-easyui-1.3/themes/icon.css">
<script type="text/javascript"
	src="<%=contextPath%>/js/jquery-easyui-1.3/jquery-1.7.2.min.js"></script>
<script type="text/javascript"
	src="<%=contextPath%>/js/jquery-easyui-1.3/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="<%=contextPath%>/js/jquery-easyui-1.3/locale/easyui-lang-zh_CN.js"></script>
<script>
	$(function() {
		$('#tblSection').datagrid({
			title : '医生管理',
			height : 500,
			nowrap : true,
			autoRowHeight : false,
			striped : true,
			collapsible : false,
			url : '<%=contextPath%>/section_data.json',
			sortName : 'code',
			sortOrder : 'desc',
			remoteSort : false,
			idField : 'id',
			columns : [ [ {
				field : 'ck',
				checkbox : true
			}, {
				title : 'ID',
				field : 'id',
				width : 80,
				sortable : true
			}, 
			{
				field : 'name',
				title : '医生名称',
				width : 100
			}, 
			{
				field : 'sec_seltf_code',
				title : '医生编码',
				width : 100,
				sortable : true
			}, 
			{
				field : 'pro_title',
				title : '职称名称',
				width : 60
			}, 
			{
				field : 'gender',
				title : '性别',
				width : 50,
				sortable : true
			}, 


			{
				field : 'sec_name',
				title : '科室名称',
				width : 120,
				sortable : true
			}, 
			{
				field : 'sec_seltf_code',
				title : '科室编码',
				width : 100,
				sortable : true
			}, 
			{
				field : 'hospital_name',
				title : '医院名称',
				width : 120
			}, 
			{
				field : 'hos_seltf_code',
				title : '医院编码',
				width : 100,
				sortable : true
			}, 	
			{
				field : 'opt',
				title : '操作',
				width : 100,
				align : 'center',
				rowspan : 2,
				formatter : function(value, rec) {
					return '<span style="color:red">编辑 删除</span>';
				}
			} ] ],

			pagination : true,
			rownumbers : true,
			
			toolbar : [ {
				id : 'btnadd',
				text : '新增',
				iconCls : 'icon-add',
				handler : function() {
					$('#btnsave').linkbutton('enable');
					alert('新增')
				}
			}, {
				id : 'btncut',
				text : '删除	',
				iconCls : 'icon-cut',
				handler : function() {
					$('#btnsave').linkbutton('enable');
					alert('删除')
				}
			}]
		});
		
		
		var p = $('#test').datagrid('getPager');
		$(p).pagination({
			onBeforeRefresh : function() {
				alert('before refresh');
			}
		});
	});
	
	
	
</script>
<title>Insert title here</title>
</head>
<body>
	<table id="tblSection" width="98%" height="">
	</table>

</body>
</html>